import com.edu.pojo.College;
import com.edu.service.CollegeServiceImpl;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class CollegeText {
    @Test
    public void text(){
        ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml");
        CollegeServiceImpl collegeServiceImpl = (CollegeServiceImpl) context.getBean("collegeServiceImpl");
        for(College college: collegeServiceImpl.getAllCollege())
            System.out.println(college);
    }
}
